The present invention relates to an image processing method and apparatus, and more particularly, to an image processing method and apparatus for performing color matching according to ambient light.
FIG. 1 is a conceptual view of general color matching.
Input RGB data is converted by an input profile to XYZ data of a color space which does not depend on any devices. Since an output device cannot express colors outside the color reproduction range of the output device, gamut mapping is performed on the inputted data, which has been converted to the data in the device-independent color space, such that all colors of the inputted data fall within the color reproduction range of the output device. After the gamut mapping is performed, the inputted data is converted from the device-independent color space to CMYK data of a color space which is dependent on the output device.
In color matching, a reference white point and ambient light are fixed. For instance, according to a profile specified by the International Color Consortium (ICC), Profile Connection Space (PCS) for associating profiles uses XYZ values or Lab values based on a D50 characteristic. Therefore, correct color reproduction is guaranteed when an inputted original document and a printout are viewed under an illuminant of the D50 characteristic. Under an illuminant of other characteristics, correct color reproduction is not guaranteed.
When a sample (e.g., an image) is viewed under different illuminants, XYZ values of the viewed sample naturally vary. The XYZ values under various illuminants are predicted by conversion methods such as (1) ratio conversion, (2) Von Kries conversion, and (3) prediction formula using a color perception model.
In the ratio conversion method, XYZ values under a reference white point W1 are converted to XYZ values under a reference white point W2 at a ratio of W2/W1. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1(Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2(Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by the ratio conversion:                                                                         X2                =                                                      Xw2                    Xw1                                    ⁢                                      xe2x80x83                                    ⁢                  X1                                                                                                        Y2                =                                                      Yw2                    Yw1                                    ⁢                                      xe2x80x83                                    ⁢                  Y1                                                                                                        Z2                =                                                      Zw2                    Zw1                                    ⁢                                      xe2x80x83                                    ⁢                  Z1                                                                    }                            (        1        )            
According to the Von Kries conversion, XYZ values under the reference white point W1 are converted to XYZ values under the reference white point W2 at a ratio of W2xe2x80x2/W1xe2x80x2 in a human color perception space PQR. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 do not become equal to the Lab values under W2. Assuming that XYZ values of a sample under W1(Xw1, Yw1, Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2(Xw2, Yw2, Zw2) are (X2, Y2, Z2), the following relations are obtained by Von Kries conversion:                               [                                                    X2                                                                    Y2                                                                    Z2                                              ]                =                                                            [                                                                                                    xe2x80x83                                                                                                                        inv_Mat                                                                                                                          xe2x80x83                                                                                            ]                            ⁡                              [                                                                                                    Pw2                        Pw1                                                                                    0                                                              0                                                                                                  0                                                                                      Qw2                        Qw1                                                                                    0                                                                                                  0                                                              0                                                                                      Rw2                        Rw1                                                                                            ]                                      ⁡                          [                                                                                          xe2x80x83                                                                                                            Mat                                                                                                              xe2x80x83                                                                                  ]                                ⁡                      [                                                            X1                                                                              Y1                                                                              Z1                                                      ]                                              (        2        )            
where                               [                                                    Pw2                                                                    Qw2                                                                    Rw2                                              ]                =                              [                                                                                xe2x80x83                                                                                                Mat                                                                                                  xe2x80x83                                                                        ]                    ⁡                      [                                                            Xw2                                                                              Yw2                                                                              Zw2                                                      ]                                              (        3        )                                          [                                                    Pw1                                                                    Qw1                                                                    Rw1                                              ]                =                              [                                                                                xe2x80x83                                                                                                Mat                                                                                                  xe2x80x83                                                                        ]                    ⁡                      [                                                            Xw1                                                                              Yw1                                                                              Zw1                                                      ]                                              (        4        )                                          [                                                                      xe2x80x83                                                                                    inv_Mat                                                                                      xe2x80x83                                                              ]                =                  [                                                    1.85995                                                              -                  1.12939                                                            0.21990                                                                    0.36119                                            0.63881                                            0                                                                    0                                            0                                            1.08906                                              ]                                    (        5        )                                          [                                                                      xe2x80x83                                                                                    Mat                                                                                      xe2x80x83                                                              ]                =                  [                                                    0.44024                                            0.70760                                                              -                  0.08081                                                                                                      -                  0.22630                                                            1.16532                                            0.04570                                                                    0                                            0                                            0.91822                                              ]                                    (        6        )            
To convert XYZ values under a viewing condition VC1 (including W1) to XYZ values under a viewing condition VC2 (including W2), the prediction formula using a color perception model, which is a conversion method such as CIE CAM 97s using the human color perception space QMH (or JCH) is employed. Herein, Q for QMH represents brightness, M represents colorfulness, and H represents hue quadrature or hue angle. J for JCH represents lightness, C represents chroma, and H represents hue quadrature or hue angle. If this conversion method is applied to the Lab uniform color space, the Lab values under W1 are not equal to the Lab values under W2, similarly to the case of the Von Kries conversion. Assuming that XYZ values of a sample under W1(Xw1, Yw1 Zw1) are (X1, Y1, Z1) and XYZ values of the sample under W2(Xw2, Yw2, Zw2) are (X2, Y2, Z2), the prediction formula using color appearance model performs the following conversion:
(X1, Y1, Z1)xe2x86x92[forward conversion of CIE CAM97s]xe2x86x92(Q, M, H) or (J, C, H)xe2x86x92[inverse conversion of CIE CAM97s] (X2, Y2, Z2)
In other words, if it is assumed that XYZ values under a reference white point which varies depending on a ratio conversion can be converted, the contour lines of hue in the Lab color spaces under various reference white points are always the same. However, if human color perception is taken into consideration, such as in the Von Kries conversion or prediction formula using a color perception model, the contour lines of hue in the Lab color spaces under different reference white points vary depending on the reference white points.
For the above reason, if gamut mapping (hue restoration) defined under one Lab color space is applied to color matching under different reference white points, the human vision perceives the hue as inconsistent.
Moreover, in the current ICC profile, since the PCS is limited to XYZ values or Lab values based on the D50 characteristic, color matching corresponding to ambient light cannot be performed.
The present invention is made in consideration of the above situation, and has as its object to provide an image processing method and apparatus for realizing excellent color reproduction regardless of viewing conditions.
Another object of the present invention is to provide an image processing method and apparatus for realizing excellent color reproduction particularly by performing partial adaptation processing.
Furthermore, another object of the present invention is to provide an image processing method and apparatus which enable adjustment of partial adaptation processing so as to adjust chromatic adaptability processing to obtain a result desired by a user.
In order to attain the above objects, the present invention provides an image processing method for performing chromatic adaptability conversion processing on input image data based on a viewing condition, wherein the chromatic adaptability conversion processing performs partial adaptation processing in accordance with ambient light and an illuminant, and at least one parameter of the partial adaptation processing can be adjusted.
Furthermore, in order to attain the above objects, the present invention provides an image processing apparatus comprising conversion means for at least performing chromatic adaptability conversion processing on input image data based on a viewing condition, wherein the chromatic adaptability conversion processing performs partial adaptation processing in accordance with ambient light and an illuminant, and at least one parameter of the partial adaptation processing can be adjusted.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.